<%@ page contentType="text/html;charset=UTF-8"%>
<%@include file="../../common/sessionValidate.jsp" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
    String filegroup = String.valueOf(System.currentTimeMillis());
%>
<!DOCTYPE HTML>
<html lang="UTF-8">
<head>
    <title>T_company信息维护</title>
    <%@ include file="../../common/meta.jsp"%>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="X-UA-Compatible" content="IE=9">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
    <link rel="stylesheet" href="<%=basePath%>css/my-bootstrap.css" media="screen"  id="tuserskin">
    <link rel="stylesheet" href="<%=basePath%>js/toastr/toastr.css">
    <link rel="stylesheet" href="<%=basePath%>css/bootstrapValidator.min.css">
    <link rel="stylesheet" href="<%=basePath%>css/font-awesome.min.css">
    <script type="text/javascript" src="<%= basePath %>js/jquery.cookie.js"></script>
</head>
<style>
    hr {
        margin-top:1px;
        border-bottom: 1px solid #1BBC9B;
    }
</style>
<body>
<form class="form-horizontal form-bordered form-row-strippe" name="ffAdd" id="ffAdd" mentod="post" role="form" data-toggle="validator" enctype="multipart/form-data">
    <div class="" style="margin-right:2px;padding-right:1px;">

        <!-------------------------- 面板  start--------------------------------->
        <div class="panel panel-primary" >
            <div class="panel-heading clearfix"  id="addHeaderDiv">
            </div>
            <div class="panel-body">
                <div class="row" >
                    <h5>&nbsp;&nbsp;基本信息</h5>
                    <hr>
                    <div class="col-xs-6"><!--start 换列-->
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"><font color="red">*</font>业主/租客</label>
                                <div class="col-xs-9">
                                    <input id="ownername" name="ownername" type="text" class="form-control" placeholder="" />
                                    <input id="company_id" name="company_id" type="hidden" />
                                    <input id="biztype" name="biztype" type="hidden" value="yezhuzuke" />
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"><font color="red">*</font>租客/企业名称</label>
                                <div class="col-xs-9">
                                    <input id="company_name" name="company_name" type="text" class="form-control" placeholder="" />
                                </div>
                            </div>
                        </div>

                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"><font color="red">*</font>省</label>
                                <div class="col-xs-9">
                                    <input id="province" name="province" type="text" class="form-control" placeholder="" />
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"><font color="red">*</font>市</label>
                                <div class="col-xs-9">
                                    <input id="city" name="city" type="text" class="form-control" placeholder="" />
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"><font color="red">*</font>区</label>
                                <div class="col-xs-9">
                                    <input id="area" name="area" type="text" class="form-control" placeholder="" />
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> <font color="red">*</font>详细地址</label>
                                <div class="col-xs-9">
                                    <input id="company_addres" name="company_addres" type="text" class="form-control" placeholder="" />
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3">企业性质</label>
                                <div class="col-xs-9">
                                    <input id="ext4" name="ext4" type="text" class="form-control" placeholder="" />
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3">企业规模</label>
                                <div class="col-xs-9">
                                    <input id="ext5" name="ext5" type="text" class="form-control" placeholder="" />
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 企业介绍</label>
                                <div class="col-xs-9">
                                    <input id="info" name="info" type="text" class="form-control" placeholder="" />
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 企业邮箱</label>
                                <div class="col-xs-9">
                                    <input id="controllermail" name="controllermail" type="text" class="form-control" placeholder="" />
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 身份证号/营业执照编号</label>
                                <div class="col-xs-9">
                                    <input id="personcard1" name="personcard1" type="text" class="form-control" placeholder="" />
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"><strong>上传附件</strong></label>
                                <div class="col-xs-9">
                                    <a href="#" onclick="javascript:window.open('<%=basePath%>upload/toUploadOneFile2?oldfilename=img&newfilename=imagepath&filegroup=<%=filegroup%>','','status=yes,scrollbars=yes,location=no,top=300,left=500,width=420,height=300')">上传附件</a>
                                    <input id="imagepath" name="imagepath" type="hidden" value="" class="form-control" />
                                    <input id="img" name="img" type="hidden" value="" class="form-control" />
                                    <input id="ranger" name="ranger" type="hidden" value="<%=filegroup%>" class="form-control" />
                                </div>
                            </div>
                        </div>

                        <!--如果输入元素是偶数个元素，在n=size/2?int时输出2列格式；如果元素是奇数个，需要在n=size/2?int时输出2列格式；需要换列，每行最多显示2列-->
                    </div><!--end 换列--><!--start 换列-->
                    <div class="col-xs-6">
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> <font color="red">*</font>个人/企业</label>
                                <div class="col-xs-9">
                                    <select id="ext3" name="ext3"  class="form-control">
                                        <option value="企业">企业</option>
                                        <option value="个人">个人</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> <font color="red">*</font>租客/企业联系人</label>
                                <div class="col-xs-9">
                                    <input id="controllername" name="controllername" type="text" class="form-control" placeholder="" />
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> <font color="red">*</font>租客/企业联系人电话</label>
                                <div class="col-xs-9">
                                    <input id="controllertel" name="controllertel" type="text" class="form-control" placeholder="" />
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 企业简称</label>
                                <div class="col-xs-9">
                                    <input id="simplename" name="simplename" type="text" class="form-control" placeholder="" />
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 行业</label>
                                <div class="col-xs-9">
                                    <input id="companytype" name="companytype" type="text" class="form-control" placeholder="" />
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 电话</label>
                                <div class="col-xs-9">
                                    <input id="company_tel" name="company_tel" type="text" class="form-control" placeholder="" />
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 星级</label>
                                <div class="col-xs-9">
                                    <input id="level" name="level" type="text" class="form-control" placeholder="" />
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 入驻时间</label>
                                <div class="col-xs-9">
                                    <input id="entertime" name="entertime" type="text" class="form-control" placeholder="" />
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3">标签</label>
                                <div class="col-xs-9">
                                    <input id="lable" name="lable" type="text" class="form-control" placeholder="" />
                                </div>
                            </div>
                        </div>
                        <!--
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 公司logo</label>
                                <div class="col-xs-9">
                                    <input id="logo" name="logo" type="text" class="form-control" placeholder="" />
                                </div>
                            </div>
                        </div>
                        -->
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 注册资本</label>
                                <div class="col-xs-9">
                                    <input id="ext2" name="ext2" type="text" class="form-control" placeholder="" />
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"><strong>附件列表</strong></label>
                                <div class="col-xs-9">
                                    <table border="0" id="filetableDiv">
                                        <thead id="grid_head">
                                        <tr><td></td></tr>
                                        <tbody id="fileListDiv"></tbody>
                                    </table>
                                </div>
                            </div>
                        </div>

                    </div><!--end 换列-->
                </div><!--end row-->
            </div><!--end body-->

            <div class="modal-footer bg-info " id='buttonDiv'>
            </div>
        </div>
        <!--------------------------面板 end------------------------------------>

        <!-- 模态框（Modal）start -->
        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
             aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title" id="myModalLabel">提示</h4>
                    </div>
                    <div class="modal-body" id="myModalMessDiv"></div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal -->
        </div>
        <!-- 模态框（Modal）end -->
    </div>
</form>
</body>
</html>

<script src="<%=basePath%>js/bootstrap.min.js"></script>
<!--<script src="<%=basePath%>js/jquery-1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrapValidator.js"></script>-->
<script src="<%=basePath%>js/bootstrap-paginator.min.js"></script>
<script src="<%=basePath%>/js/respond.js"></script>
<script src="<%=basePath%>/js/html5.js"></script>
<script src="<%=basePath%>js/toastr/toastr.js"></script>
<script src="<%=basePath%>js/bootbox.js"></script>
<script src="<%=basePath%>js/jquery.validate.js"></script>
<!-- <script src="<%=basePath%>js/additional-methods.min.js"></script> -->
<script src="<%=basePath%>js/my-jquery-curd.js"></script>
<script src="<%= basePath %>js/tableSortTool.js" ></script>
<script src="<%= basePath %>js/calendar.js" ></script>
<script type="text/javascript">
    //新增保存数据
    function add() {
        $("#addSaveButton").attr("disabled", true);
        var url = "<%=basePath%>t_company/saveT_company?time="+Math.random();
        var postData = $("#ffAdd").serializeArray();
        //alert(postData);
        $.post(url, postData, function (data) {
            //var data = $.parseJSON(data);
            if (data.result=="success") {
                //保存成功  1.关闭弹出层，
                showSuccessTips("恭喜保存成功!", "提示");
                history.goBack();
            }
            else {
                $("#addSaveButton").removeAttr("disabled");
                //showErrorTips("保存数据失败!", "错误信息：");
                $("#myModal").modal('show'); //hide;
                $("#myModalMessDiv").html("<font color='red'>对不起,保存数据失败，失败原因：" + data.info + "</font>");
                return false;
            }
        }).error(function () {
            $("#addSaveButton").removeAttr("disabled");
            //showErrorTips("保存数据失败!", "错误信息：");
            $("#myModal").modal('show'); //hide;
            $("#myModalMessDiv").html("<font color='red'>对不起,保存数据失败，失败原因：" + data.info + "</font>");
        });
    }

    //更新修改数据到后台
    function edit(){
        $("#editSaveButton").attr("disabled", true);
        var url = "<%=basePath%>t_company/updateT_company?time="+Math.random();
        myEdit2(url);
    }

    //更新修改数据到后台并且启动工作流
    function tjsh() {
        $("#editSaveButton").attr("disabled", true);
        $("#tjshSaveButton").attr("disabled", true);
        var url = "<%=basePath%>t_company/tjshT_company?time=" + Math.random();
        myCurdTjsh(url);
    }

    //展示附件文件列表；
    function showFileList(oldfilenames, newfilenames){
        var showmess= oldfilenames.split(";");
        var newfilename= newfilenames.split(";");
        var trtdlist = "";
        for (var i = 0; i < showmess.length; i++ ){
            trtdlist += "<tr><td><a href='<%=basePath%>download?filename="+newfilename[i]+"'>"+showmess[i]+"</a></td></tr>";
        }
        //删除全部附件按钮；
        //trtdlist+="<a href='javascript:deleteAllFile(<%=request.getParameter("id")%>)' class='text-danger'>&nbsp;&nbsp;<span class='icon-remove' style='color:rgb(0, 128, 255)'></span>删除全部附件</a>&nbsp;&nbsp;";

        $("#fileListDiv").html("");
        document.getElementById("fileListDiv").innerHTML = trtdlist;
    }
    //删除附件
    function deleteAllFile(id) {
        var url = "<%=basePath%>t_company/delT_companyAllFile?id=" + id +"&time="+Math.random();
        bootbox.confirm({
            size: 'small',
            buttons: {
                confirm: {
                    label: ' 删除 ',
                    className: 'btn btn-sm btn-danger'
                },
                cancel: {
                    label: '   取消     ',
                    className: 'btn btn-success btn-sm'
                }
            },
            message: '您确认要删除全部附件？删除后根据需要重新上传！',
            callback: function(result) {
                if(result) {if(result){ myCompanyAllFileDel(url);}}
            },
            title:'删除附件提示：',
            className:' '
        })
    }

    //删除楼栋附件
    function myCompanyAllFileDel(url) {
        $.get(url, function (data) {
            if ("success" == data.result) {
                showSuccessTips("删除成功", "提示");
                $("#fileListDiv").html("");
                $("#imagepath").val("");
                $("#img").val("");
            } else {
                showErrorTips("删除数据" + id + "失败!", "错误信息：");
            }
        });
    }

    //初始化页面及校验
    $().ready(function(){
        //1、初始化数据显示
        var name = "业主/租客";
        var optype ='<%=request.getParameter("oplx")%>';
        var id='<%=request.getParameter("id")%>';
        //alert("optype="+optype+";id="+id);
        if(optype=='add'){
            $("#ffAdd")[0].reset();/*重置表单*/
            var basePath="<i class='icon-plus'></i>&nbsp;";
            setHeader2("新增"+name, basePath);//设置addHeaderDiv标题文字及按钮
            setButtonDivAdd2();//设置adddiv的 操作按钮
        }else if(optype=='edit'){
            var basePath="<i class='icon-pencil'></i>&nbsp;";
            setHeader2("修改"+name, basePath);//设置addHeaderDiv标题文字及按钮
            setButtonDivEdit2();//设置adddiv的 操作按钮
            //setButtonDivEdit4();//设置adddiv的 操作按钮
            var url = "<%=basePath%>t_company/getT_company?id="+id+"&time="+Math.random();
            $.getJSON(url, function (data) {//获取数据，并且自动填充form，自动代码待修改； @todo;
                setValue(data);
                if(null!=data.img &&""!=data.img) {
                    showFileList(data.img, data.imagepath); //设置附件列表展示；
                    var trtdlist ="<a href='javascript:deleteAllFile(<%=request.getParameter("id")%>)' class='text-danger'>&nbsp;&nbsp;<span class='icon-remove' style='color:rgb(0, 128, 255)'></span>删除全部附件</a>&nbsp;&nbsp;";
                    $("#fileListDiv").append(trtdlist);
                }
            });
        }else if(optype=='view'){
            var basePath="<i class='icon-eye-open'></i>&nbsp;";//设置addHeaderDiv标题文字及按钮
            setHeader2("查看"+name, basePath);
            setButtonDivView2();//设置adddiv的 操作按钮
            var url = "<%=basePath%>t_company/getT_company?id="+id+"&time="+Math.random();
            $.getJSON(url, function (data) {//获取数据，并且自动填充form，自动代码待修改； @todo;
                setValue(data);
                if(null!=data.img &&""!=data.img) {
                    showFileList(data.img, data.imagepath); //设置附件列表展示；
                }
            });
            formReadOnly('ffAdd');//设置表单不可修改
        }

        //2、校验脚本初始化，start check
        $("#ffAdd").validate({
            submitHandler:function(form){
                //alert($("#opType").val());
                if($("#opType").val()=="add"){
                    add();
                }else if($("#opType").val()=="edit"){
                    edit();
                }
            },
            rules: {
                company_id: {
                    //required: true,
                    digits: true,
                    //minlength: 1,
                    maxlength: 11
                },
                company_name: {
                    required: true,
                    maxlength: 128
                },
                company_addres: {
                    required: true,
                    maxlength: 512
                },
                company_tel: {
                    //required: true,
                    maxlength: 128
                },
                company_linkman: {
                    //required: true,
                    maxlength: 128
                },
                ext1: {
                    //required: true,
                    maxlength: 128
                },
                ext2: {
                    //required: true,
                    maxlength: 256
                },
                ext3: {
                    //required: true,
                    maxlength: 512
                },
                inserttime: {
                    //required: true,
                    maxlength: 45
                },
                updatetime: {
                    //required: true,
                    maxlength: 45
                },
                creater: {
                    //required: true,
                    maxlength: 45
                },
                updater: {
                    //required: true,
                    maxlength: 45
                },
                status: {
                    //required: true,
                    maxlength: 45
                },
                memo: {
                    //required: true,
                    maxlength: 256
                },
                img: {
                    //required: true,
                    maxlength: 512
                },
                company_no: {
                    //required: true,
                    maxlength: 256
                },
                biztype: {
                    //required: true,
                    maxlength: 45
                },
                province: {
                    required: true,
                    maxlength: 45
                },
                city: {
                    required: true,
                    maxlength: 45
                },
                area: {
                    required: true,
                    maxlength: 45
                },
                channel: {
                    //required: true,
                    maxlength: 45
                },
                needarea1: {
                    //required: true,
                    maxlength: 45
                },
                needarea2: {
                    //required: true,
                    maxlength: 45
                },
                channellinkman: {
                    //required: true,
                    maxlength: 45
                },
                needbuildingno: {
                    //required: true,
                    maxlength: 45
                },
                needhouseno: {
                    //required: true,
                    maxlength: 45
                },
                ext4: {
                    //required: true,
                    maxlength: 45
                },
                ext5: {
                    //required: true,
                    maxlength: 45
                },
                companytype: {
                    //required: true,
                    maxlength: 45
                },
                simplename: {
                    //required: true,
                    maxlength: 256
                },
                ownername: {
                    required: true,
                    maxlength: 256
                },
                bussinestype: {
                    //required: true,
                    maxlength: 45
                },
                level: {
                    //required: true,
                    maxlength: 45
                },
                info: {
                    //required: true,
                    maxlength: 1024
                },
                entertime: {
                    //required: true,
                    maxlength: 45
                },
                lable: {
                    //required: true,
                    maxlength: 45
                },
                logo: {
                    //required: true,
                    maxlength: 1024
                },
                personcard1: {
                    //required: true,
                    maxlength: 1024
                },
                personcard2: {
                    //required: true,
                    maxlength: 1024
                },
                controllername: {
                    required: true,
                    maxlength: 45
                },
                controllertel: {
                    required: true,
                    maxlength: 45
                },
                controllermail: {
                    //required: true,
                    maxlength: 45
                },
                controllerjob: {
                    //required: true,
                    maxlength: 256
                },
                imagepath: {
                    //required: true,
                    maxlength: 1024
                }
            }, //end rules;
            messages: {
                company_id: {
                    //required: "公司主键不能为空！",
                    digits: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'>公司主键最大支持11位，输入的数据已经超过最大长度！</font>"
                },
                company_name: {
                    required: "<font color='red'>企业名称不能为空！</font>！",
                    maxlength: "<font color='red'>企业名称最大支持64位,输入的数据已经超过最大长度！</font>"
                },
                company_addres: {
                    required: "<font color='red'>详细地址不能为空！</font>！",
                    maxlength: "<font color='red'>详细地址最大支持256位,输入的数据已经超过最大长度！</font>"
                },
                company_tel: {
                    maxlength: "<font color='red'>电话最大支持128位,输入的数据已经超过最大长度！</font>"
                },
                company_linkman: {
                    maxlength: "<font color='red'>联系人最大支持128位,输入的数据已经超过最大长度！</font>"
                },
                ext1: {
                    maxlength: "<font color='red'> ext1最大支持128位,输入的数据已经超过最大长度！</font>"
                },
                ext2: {
                    maxlength: "<font color='red'> ext2最大支持256位,输入的数据已经超过最大长度！</font>"
                },
                ext3: {
                    maxlength: "<font color='red'> ext3最大支持512位,输入的数据已经超过最大长度！</font>"
                },
                inserttime: {
                    maxlength: "<font color='red'>创建时间最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                updatetime: {
                    maxlength: "<font color='red'>更新时间最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                creater: {
                    maxlength: "<font color='red'>创建人最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                updater: {
                    maxlength: "<font color='red'>更新人最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                status: {
                    maxlength: "<font color='red'> status最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                memo: {
                    maxlength: "<font color='red'>备注最大支持256位,输入的数据已经超过最大长度！</font>"
                },
                img: {
                    maxlength: "<font color='red'>图片最大支持512位,输入的数据已经超过最大长度！</font>"
                },
                company_no: {
                    maxlength: "<font color='red'>商户号最大支持256位,输入的数据已经超过最大长度！</font>"
                },
                biztype: {
                    maxlength: "<font color='red'> biztype最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                province: {
                    required: "<font color='red'>省不能为空！</font>",
                    maxlength: "<font color='red'> 省 最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                city: {
                    required: "<font color='red'>市不能为空！</font>",
                    maxlength: "<font color='red'> 市最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                area: {
                    required: "<font color='red'>区不能为空！</font>",
                    maxlength: "<font color='red'> 区最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                channel: {
                    maxlength: "<font color='red'> channel最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                needarea1: {
                    maxlength: "<font color='red'> needarea1最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                needarea2: {
                    maxlength: "<font color='red'> needarea2最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                channellinkman: {
                    maxlength: "<font color='red'> channellinkman最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                needbuildingno: {
                    maxlength: "<font color='red'> needbuildingno最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                needhouseno: {
                    maxlength: "<font color='red'> needhouseno最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                ext4: {
                    maxlength: "<font color='red'> ext4最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                ext5: {
                    maxlength: "<font color='red'> ext5最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                companytype: {
                    maxlength: "<font color='red'>所属行业最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                simplename: {
                    maxlength: "<font color='red'>简称最大支持256位,输入的数据已经超过最大长度！</font>"
                },
                ownername: {
                    required: "<font color='red'>业主/租客不能为空！</font>",
                    //digits: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    maxlength: "<font color='red'> 业主/租客最大支持64位,输入的数据已经超过最大长度！</font>"
                },
                bussinestype: {
                    maxlength: "<font color='red'>行业类型最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                level: {
                    maxlength: "<font color='red'>星级最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                info: {
                    maxlength: "<font color='red'>企业介绍最大支持1,024位,输入的数据已经超过最大长度！</font>"
                },
                entertime: {
                    maxlength: "<font color='red'>入驻时间最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                lable: {
                    maxlength: "<font color='red'>标签最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                logo: {
                    maxlength: "<font color='red'> logo最大支持1,024位,输入的数据已经超过最大长度！</font>"
                },
                personcard1: {
                    maxlength: "<font color='red'> personcard1最大支持1,024位,输入的数据已经超过最大长度！</font>"
                },
                personcard2: {
                    maxlength: "<font color='red'> personcard2最大支持1,024位,输入的数据已经超过最大长度！</font>"
                },
                controllername: {
                    required: "<font color='red'>企业联系人不能为空！</font>",
                    maxlength: "<font color='red'> 企业联系人最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                controllertel: {
                    required: "<font color='red'>企业联系人电话不能为空！</font>",
                    maxlength: "<font color='red'>企业联系人电话最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                controllermail: {
                    maxlength: "<font color='red'> controllermail最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                controllerjob: {
                    maxlength: "<font color='red'> controllerjob最大支持256位,输入的数据已经超过最大长度！</font>"
                },
                imagepath: {
                    maxlength: "<font color='red'>附件地址最大支持1,024位,输入的数据已经超过最大长度！</font>"
                }
            } //end message;
        }); //end validate;
    }) //end funciton read;
</script>
